package tech.aistar.day14;

/**
 * 本类用来演示: 供反射来操作的类
 *
 * @author: success
 * @date: 2021/3/25 9:49 上午
 */
public class Point {
    //私有的属性
    private int x;

    private String y;

    public Point(){
        System.out.println("空参构造...");
    }

    public Point(int x,String y){
        System.out.println("带参构造");
        this.x = x;
        this.y = y;
    }

    private void test01(){
        System.out.println("私有方法");
    }

    private String test01(int x){
        System.out.println("int x");
        return "x:"+x;
    }

    private static void test01(int x,String y){
        System.out.println(x+"->"+y);
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("Point{");
        sb.append("x=").append(x);
        sb.append(", y='").append(y).append('\'');
        sb.append('}');
        return sb.toString();
    }
}
